Learn R Programming

Compositional (version 3.7)

The Frechet mean for compositional data: The Frechet mean for compositional data

Description

Mean vector using the \(\alpha\)-transformation.

Usage

frechet(x, a)

Arguments

x

A matrix with the compositional data.

a

The value of the power transformation, it has to be between -1 and 1. If zero values are present it has to be greater than 0. If \(\alpha=0\) the isometric log-ratio transformation is applied and the closed geometric mean is calculated.

Value

A vector with the Frechet mean for the given value of \(\alpha\).

Details

The power transformation is applied to the compositional data and the mean vector is calculated. Then the inverse of it is calculated and the inverse of the power transformation applied to the last vector is the Frechet mean.

References

Tsagris M.T., Preston S. and Wood A.T.A. (2011). A data-based power transformation for compositional data. In Proceedings of the 4th Compositional Data Analysis Workshop, Girona, Spain.

See Also

alfa, alfainv, profile

Examples

Run this code
# NOT RUN {
library(MASS)
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
frechet(x, 0.2)
frechet(x, 1)
# }

Run the code above in your browser using DataLab